home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / libsrc / vputa.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  718 b   |  43 lines

  1. /*
  2. ** vputa.c
  3. **
  4. ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include "pictor.h"
  9.  
  10. /*
  11. ** Prints attribute-only to current video position.
  12. */
  13. void vputa(int attribute)
  14. {
  15.     _asm    mov    di,_PL_offset
  16.     _asm    inc    di
  17.     _asm    mov    ax,_PL_segment
  18.     _asm    mov    es,ax
  19.     _asm    mov    ax,attribute
  20.     _asm    cmp    _PL_snowcheck,FALSE
  21.     _asm    je     direct
  22.     _asm    mov    bx,ax
  23.     _asm    mov    dx,CGA_STATUS_PORT
  24.     scan_lo:
  25.     _asm    in     al,dx
  26.     _asm    shr    al,1
  27.     _asm    jc     scan_lo
  28.     _asm    cli
  29.     scan_hi:
  30.     _asm    in     al,dx
  31.     _asm    shr    al,1
  32.     _asm    jnc    scan_hi
  33.     _asm    xchg    ax,bx
  34.     _asm    stosb
  35.     _asm    sti
  36.     _asm    jmp   end_vputa
  37.     direct:
  38.     _asm    stosb
  39.     end_vputa:
  40.     _asm    mov   _PL_offset,di
  41.  
  42. } /* vputa */
  43.